package com.meilele.util.czh;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyApplicationContext {
    private MyApplicationContext(){}

    private static ApplicationContext ctx;

    static{
        ctx = new ClassPathXmlApplicationContext("spring.xml");
    }

    public static Object getBean(String name){
        return ctx.getBean(name);
    }
}
